/**
 * @file ex1_12.c
 * @author hjr (yanyuzuixin@163.com)
 * @brief 数据统计 多组输入输出
 * @version 0.1
 * @date 2020-02-29
 * 
 * @copyright Copyright (c) 2020 yanyuzuixin.com All Rights Reserved.
 * 
 */

#include <stdio.h>

#define INF 100000000

int main()
{
    int n;
    int x;
    int min = INF;
    int max = -INF;
    int sum = 0;
    int kase = 0;
    while (scanf("%d", &n) == 1 && n != 0) {
        /* 每计算完一组数据要给相关变量初始化 */
        min = INF;
        max = -INF;
        sum = 0;
        for (int i = 0; i < n; i++) {
            scanf("%d", &x);
            if (min > x) {
                min = x;
            }
            if (max < x) {
                max = x;
            }
            sum += x;
        }
        if (kase) {     /* 输出行间间隔行的技巧 */
            printf("\n");
        }
        kase++;
        printf("Case %d: %d %d %.3f", kase, min, max, (double)sum / n);
    }
    return 0;
}
